<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection" />
    <meta content="emai=no" name="format-detection" />
    <link rel="stylesheet" type="text/css" href="/css/common.css" />
    <link rel="stylesheet" type="text/css" href="/css/groupdetail.css" />
    <title>社团详情</title>
</head>
<body>
    <div class="wrapper">
        <header>
            <div class="flex-wrapper flex-align-center">
                <div class="header-left">
                    <span class="avatar">
                        <img src="<?php echo STATIC_IMAGE . $organization['icon']?>" />
                    </span>
                </div>
                <div class="header-right flex-1">
                    <p class="title">
                    	<?php echo $organization['organization_name']?>
                    </p>
                    <!--<a class="btn-join">已申请</a>
                    <a class="btn-join">已入社</a>-->
                    <a class="btn-join <?php echo $icon['class']?>" <?php if($icon['status'] == 3):?> href="/organization/join?id=<?php echo $organization['id']?>" <?php endif;?>><?php echo $icon['name']?></a>
                </div>
            </div>
        </header>
        <div class="nav-l">
            <ul class="flex-wrapper">
                <li class="flex-1 <?php if($type == 2):?>active<?php endif;?>"><a>简介</a></li>
                <li class="flex-1"><a>社长</a></li>
                <li class="flex-1"><a>公告</a></li>
                <li class="flex-1 <?php if($type == 3):?>active<?php endif;?>"><a>活动</a></li>
            </ul>
        </div>
        <div class="nav-content">
            <div class="description">
            	<?php echo $organization['description']?>
            </div>
            <div class="director <?php if($type == 2):?>active<?php endif;?>">
                <p class="avatar"><img src="<?php echo STATIC_IMAGE . $organization['proprieter_icon']?>" /></p>
                <p class="name"><?php echo $organization['proprieter_name']?></p>
                <p class="content">
                    <label>社长简介：</label>
                    <?php echo $organization['proprieter_desc']?>
                </p>
            </div>
            <div class="notice">
                <h2>社区公告</h2>
                	<?php echo $organization['public'];?>
            </div>
            <div class="activity <?php if($type == 3):?>active<?php endif;?>">
            	<?php if($activityList):?>
            	<?php foreach ($activityList as $activity):?>
                <section data-href="<?php echo $activity['link']?>">
                    <p class="title"><?php echo $activity['activity_name']?></p>
                    <p class="time"><span class="icon i-notice-s"></span> 活动时间：<?php echo $activity['activity_time']?></p>
                    <p class="image">
                        <img src="<?php echo STATIC_IMAGE . $activity['image']?>" />
                    </p>
                    <p class="description interception">
                    <?php echo $activity['activity_desc']?>
                    </p>
                </section>
                <?php endforeach;?>
                <?php else:?>
                <section>
                	<div>
                	<img src="/img/no_activity.png" /><br/>
                	</div>
                </section>
                <?php endif;?>
            </div>
        </div>
    </div>
    <script src="/js/zepto-1.1.6.js" type="text/javascript"></script>
    <script src="/js/common.js" type="text/javascript"></script>
    <script>
        $(function () {
            $(".nav-l li").each(function (index, element) {
                $(this).click(function (e) {
                    e.preventDefault();

                    $(this).addClass("active");
                    $(this).siblings().removeClass("active");
                    $(".nav-content>div").eq(index).addClass("active");
                    $(".nav-content>div").eq(index).siblings().removeClass("active");
                });
            });
        });
    </script>
</body>
</html>
